namespace Bunit;

public class WheelEventDispatchExtensionsTest : EventDispatchExtensionsTest<WheelEventArgs>
{
	public WheelEventDispatchExtensionsTest(ITestOutputHelper outputHelper) : base(outputHelper)
	{
	}

	public static IEnumerable<object[]> Helpers { get; }
		= GetEventHelperMethods(x => x.Name.Contains("Wheel", StringComparison.OrdinalIgnoreCase));

	protected override string ElementName => "button";

	[Theory(DisplayName = "Mouse wheel/wheel events are raised correctly through helpers")]
	[MemberData(nameof(Helpers))]
	public void CanRaiseEvents(MethodInfo helper)
	{
		var expected = new WheelEventArgs
		{
			DeltaMode = 1337L,
			DeltaX = 4242D,
			DeltaY = 4141D,
			DeltaZ = 4040D,
			Detail = 2,
			ScreenX = 3,
			ScreenY = 4,
			ClientX = 5,
			ClientY = 6,
			Button = 7,
			Buttons = 8,
			CtrlKey = true,
			AltKey = true,
			MetaKey = true,
			Type = "TYPE",
		};

		VerifyEventRaisesCorrectly(helper, expected);
	}
}
